*** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/c-aux-info.c	Sat Feb 15 16:24:40 1992
--- c-aux-info.c	Fri Mar  6 15:18:03 1992
***************
*** 59,65 ****
     BSD systems) now provides getcwd as called for by POSIX.  Allow for
     the few exceptions to the general rule here.  */
  
! #if !(defined (USG) || defined (VMS))
  extern char *getwd ();
  #define getcwd(buf,len) getwd(buf)
  #define GUESSPATHLEN (MAXPATHLEN + 1)
--- 59,65 ----
     BSD systems) now provides getcwd as called for by POSIX.  Allow for
     the few exceptions to the general rule here.  */
  
! #if !(defined (USG) || defined (VMS) || defined(CROSSHPUX))
  extern char *getwd ();
  #define getcwd(buf,len) getwd(buf)
  #define GUESSPATHLEN (MAXPATHLEN + 1)
*** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/c-decl.c	Thu Feb 13 17:21:26 1992
--- c-decl.c	Fri Mar  6 15:18:01 1992
***************
*** 5351,5356 ****
--- 5351,5358 ----
  
    expand_function_start (fndecl, 0);
  
+ #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
+   /* we will only need this in cp-decl.c, not here */
    /* If this function is `main', emit a call to `__main'
       to run global initializers, etc.  */
    if (DECL_NAME (fndecl)
***************
*** 5357,5362 ****
--- 5359,5365 ----
        && strcmp (IDENTIFIER_POINTER (DECL_NAME (fndecl)), "main") == 0
        && DECL_CONTEXT (fndecl) == NULL_TREE)
      expand_main_function ();
+ #endif
  }
  
  /* SPECPARMS is an identifier list--a chain of TREE_LIST nodes
*** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/cccp.c	Tue Feb 18 19:52:51 1992
--- cccp.c	Fri Mar  6 15:18:06 1992
***************
*** 58,63 ****
--- 58,65 ----
  #undef bzero
  #undef bcmp
  
+ #ifndef atarist
+ 
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <ctype.h>
***************
*** 66,85 ****
  
  #ifndef VMS
  #include <sys/file.h>
! #ifndef USG
  #include <sys/time.h>		/* for __DATE__ and __TIME__ */
  #include <sys/resource.h>
  #else
  #define index strchr
  #define rindex strrchr
  #include <time.h>
  #include <fcntl.h>
! #endif /* USG */
  #endif /* not VMS */
-   
  extern char *index ();
  extern char *rindex ();
  
  /* VMS-specific definitions */
  #ifdef VMS
  #include <time.h>
--- 68,105 ----
  
  #ifndef VMS
  #include <sys/file.h>
! #if (!(defined(USG) || defined(atariminix)))
  #include <sys/time.h>		/* for __DATE__ and __TIME__ */
  #include <sys/resource.h>
  #else
+ #ifndef atariminix
  #define index strchr
  #define rindex strrchr
+ #endif
  #include <time.h>
  #include <fcntl.h>
! #endif /* USG or atariminix */
  #endif /* not VMS */
  extern char *index ();
  extern char *rindex ();
  
+ #else	/* atarist */
+ 
+ #include <ctype.h>
+ #include <stdio.h>
+ #include <types.h>
+ #include <stat.h>
+ #include <file.h>
+ #include <time.h>
+ #include <string.h>
+ #include "stddef.h"
+ 
+ long _stksize = -1L;	/* want big stack cause include files
+ 				   get alloca'ed there */
+ 
+ #endif		/* atarist */
+   
+ 
  /* VMS-specific definitions */
  #ifdef VMS
  #include <time.h>
***************
*** 847,853 ****
--- 867,927 ----
  /* Nonzero means -I- has been seen,
     so don't look for #include "foo" the source-file directory.  */
  static int ignore_srcdir;
+  
+ #ifdef atarist
+ /* a little frobule to filter incoming file data */
+ int eunuchs_read(f, buf, size)
+ int f;
+ char * buf;
+ int size;
+ {
+     char local_buf[1024];
+     register int result_size;
+     register char * local_bufp, * target_bufp;
+     register int buf_size, size_read;
+     
+     for (result_size = 0, target_bufp = buf ; size > 0 ; size -= 1024)
+     { /* do a buffer */
+ 	if (size > 1024)
+ 	    buf_size = 1024;
+ 	else
+ 	    buf_size = size;
+ 	size_read = read(f, &local_buf, buf_size);
+ 	for (local_bufp = (char * ) &local_buf; size_read > 0 ; size_read--)
+ 	    if (*local_bufp == '\r')
+ 		local_bufp++;
+ 	    else
+ 	    {
+ 		*target_bufp++ = *local_bufp++;
+ 		result_size++;
+ 	    }
+     }
+     return(result_size);
+ }
+ 
+ /* the following dingus is used in place of some calls to bcopy,
+    to ensure that backslashes get properly slashified when getting
+    shoved into strings.  Note that it returns the new pointer!!
+    There ought to be a better way... */
+ 
+ U_CHAR * slashifying_bcopy(from_buf, to_buf, nbytes)
+ U_CHAR * from_buf, * to_buf;
+ int nbytes;
+ {
+   for ( ; nbytes > 0 ; )
+ 	{
+ 	if(*from_buf == '\\')
+ 		*to_buf++ = '\\';
+ 	*to_buf++ = *from_buf++;
+ 	nbytes--;
+ 	}
+   return(to_buf);
+ }
+ #define read(a, b, c) eunuchs_read(a, b, c)
+ 
+ #endif		/* atarist */
  
+ #ifndef atarist
  /* Handler for SIGPIPE.  */
  
  static void
***************
*** 857,862 ****
--- 931,937 ----
  {
    fatal ("output pipe has been closed");
  }
+ #endif /* atarist */
  
  int
  main (argc, argv)
***************
*** 891,896 ****
--- 966,976 ----
    /* Target-name to write with the dependency information.  */
    char *deps_target = 0;
  
+ #ifdef atarist
+ /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
+ /*  _malloczero(1); */ 	/* zero mallocs by default */
+ #endif  
+ 
  #ifdef RLIMIT_STACK
    /* Get rid of any avoidable limit on stack size.  */
    {
***************
*** 939,944 ****
--- 1019,1025 ----
    signal (SIGPIPE, pipe_closed);
  #endif
  
+ #ifndef atarist
    for (i = 0; include_defaults[i].fname; i++)
      max_include_len = MAX (max_include_len,
  			   strlen (include_defaults[i].fname));
***************
*** 946,952 ****
  #ifdef VMS
    max_include_len += 10;
  #endif
! 
    bzero (pend_files, argc * sizeof (char *));
    bzero (pend_defs, argc * sizeof (char *));
    bzero (pend_undefs, argc * sizeof (char *));
--- 1027,1036 ----
  #ifdef VMS
    max_include_len += 10;
  #endif
! #else
!   max_include_len = 80;	/* arbitrary value */
! #endif
!   
    bzero (pend_files, argc * sizeof (char *));
    bzero (pend_defs, argc * sizeof (char *));
    bzero (pend_undefs, argc * sizeof (char *));
***************
*** 1145,1154 ****
--- 1229,1244 ----
  	break;
  
        case 'v':
+ #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
+ #include "PatchLev.h"
+ 	fprintf (stderr, "GNU CPP-atariST version %s Patchlevel %s",
+ 		 version_string, PatchLevel);
+ #else
  	fprintf (stderr, "GNU CPP version %s", version_string);
  #ifdef TARGET_VERSION
  	TARGET_VERSION;
  #endif
+ #endif
  	fprintf (stderr, "\n");
  	break;
  
***************
*** 1282,1287 ****
--- 1372,1378 ----
      }
    }
  
+ #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
    /* Add dirs from CPATH after dirs from -I.  */
    /* There seems to be confusion about what CPATH should do,
       so for the moment it is not documented.  */
***************
*** 1291,1296 ****
--- 1382,1388 ----
    p = (char *) getenv ("CPATH");
    if (p != 0 && ! no_standard_includes)
      path_include (p);
+ #endif
  
    /* Now that dollars_in_ident is known, initialize is_idchar.  */
    initialize_char_syntax ();
***************
*** 1411,1434 ****
  
    done_initializing = 1;
  
    { /* read the appropriate environment variable and if it exists
         replace include_defaults with the listed path. */
      char *epath = 0;
!     switch ((objc << 1) + cplusplus)
!       {
        case 0:
! 	epath = getenv ("C_INCLUDE_PATH");
  	break;
        case 1:
! 	epath = getenv ("C++_INCLUDE_PATH");
  	break;
        case 2:
! 	epath = getenv ("OBJC_INCLUDE_PATH");
  	break;
        case 3:
! 	epath = getenv ("OBJC++_INCLUDE_PATH");
! 	break;
!       }
      /* If the environment var for this language is set,
         add to the default list of include directories.  */
      if (epath) {
--- 1503,1550 ----
  
    done_initializing = 1;
  
+ #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
+   for(i = 0; i < 4; i++)
+ #endif
    { /* read the appropriate environment variable and if it exists
         replace include_defaults with the listed path. */
      char *epath = 0;
! #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
!     switch(i)
!     {
        case 0:
! 	epath = getenv("GNUINC");
  	break;
+ 
        case 1:
! 	epath = getenv("GNULIB");
  	break;
+ 
        case 2:
! 	if(cplusplus) epath = getenv("GXXINC"); else epath = 0;
  	break;
+ 	
        case 3:
! #endif
! 	switch ((objc << 1) + cplusplus)
! 	{
! 	  case 0:
! 	    epath = getenv ("C_INCLUDE_PATH");
! 	    break;
! 	  case 1:
! 	    epath = getenv ("C++_INCLUDE_PATH");
! 	    break;
! 	  case 2:
! 	    epath = getenv ("OBJC_INCLUDE_PATH");
! 	    break;
! 	  case 3:
! 	    epath = getenv ("OBJC++_INCLUDE_PATH");
! 	    break;
! 	}
! #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
!     }
! #endif
!     
      /* If the environment var for this language is set,
         add to the default list of include directories.  */
      if (epath) {
***************
*** 1437,1443 ****
--- 1553,1563 ----
        char *startp, *endp;
  
        for (num_dirs = 1, startp = epath; *startp; startp++)
+ #ifdef atarist
+ 	if ((*startp == ';') || (*startp == ','))
+ #else
  	if (*startp == ':')
+ #endif
  	  num_dirs++;
        include_defaults
  	= (struct default_include *) xmalloc ((num_dirs
***************
*** 1446,1452 ****
--- 1566,1576 ----
        startp = endp = epath;
        num_dirs = 0;
        while (1) {
+ #ifdef atarist
+ 	if ((*endp == ';') || (*endp == ',') || (*endp == '\0')) {
+ #else
  	if ((*endp == ':') || (*endp == '\0')) {
+ #endif
  	  strncpy (nstore, startp, endp-startp);
  	  if (endp == startp)
  	    strcpy (nstore, ".");
***************
*** 1455,1461 ****
--- 1579,1589 ----
  
  	  max_include_len = MAX (max_include_len, endp-startp+2);
  	  include_defaults[num_dirs].fname = savestring (nstore);
+ #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
+ 	  include_defaults[num_dirs].cplusplus = (i > 1) ? cplusplus : 0;
+ #else
  	  include_defaults[num_dirs].cplusplus = cplusplus;
+ #endif
  	  num_dirs++;
  	  if (*endp == '\0')
  	    break;
***************
*** 1473,1480 ****
--- 1601,1616 ----
       tack on the standard include file dirs to the specified list */
    if (!no_standard_includes) {
      struct default_include *p = include_defaults;
+ #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
+     char *specd_prefix = NULL;
+ #else
      char *specd_prefix = getenv ("GCC_EXEC_PREFIX");
+ #endif
+ #ifdef GCC_INCLUDE_DIR
      char *default_prefix = savestring (GCC_INCLUDE_DIR);
+ #else
+     char *default_prefix = savestring ("./");
+ #endif
      int default_len = 0;
      /* Remove the `include' from /usr/local/lib/gcc.../include.  */
      if (!strcmp (default_prefix + strlen (default_prefix) - 8, "/include")) {
***************
*** 1481,1486 ****
--- 1617,1628 ----
        default_len = strlen (default_prefix) - 7;
        default_prefix[default_len] = 0;
      }
+ #ifdef atarist
+     else if (!strcmp (default_prefix + strlen (default_prefix) - 8, "\\include")) {
+       default_len = strlen (default_prefix) - 7;
+       default_prefix[default_len] = 0;
+     }
+ #endif
      /* Search "translated" versions of GNU directories.
         These have /usr/local/lib/gcc... replaced by specd_prefix.  */
      if (specd_prefix != 0 && default_len != 0)
***************
*** 1635,1641 ****
--- 1777,1787 ----
        char *p1 = p;
        /* Discard all directory prefixes from P.  */
        while (*p1) {
+ #ifdef atarist
+ 	if ((*p1 == '/') || (*p1 == '\\'))
+ #else
  	if (*p1 == '/')
+ #endif
  	  p = p1 + 1;
  	p1++;
        }
***************
*** 1795,1800 ****
--- 1941,1947 ----
    return 0;
  }
  
+ #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
  /* Given a colon-separated list of file names PATH,
     add all the names to the search path for include files.  */
  
***************
*** 1849,1854 ****
--- 1996,2002 ----
        p++;
      }
  }
+ #endif
  
  /* Pre-C-Preprocessor to translate ANSI trigraph idiocy in BUF
     before main CCCP processing.  Name `pcp' is also in honor of the
***************
*** 3433,3440 ****
--- 3581,3597 ----
  
        if (string)
  	{
+ #ifndef atarist
  	  buf = (char *) alloca (3 + strlen (string));
  	  sprintf (buf, "\"%s\"", string);
+ #else
+     	  buf = (char *) alloca (16 + strlen (string));
+           {
+ 	      char *tbuf = (char *) alloca (16 + strlen (string));
+ 	      (void) slashifying_bcopy(string, tbuf, strlen(string)+1);
+ 	      sprintf (buf, "\"%s\"", tbuf);
+           }
+ #endif /* atarist */
  	}
        else
  	buf = "\"\"";
***************
*** 3636,3642 ****
--- 3793,3804 ----
  	    dsp[0].next = search_start;
  	    search_start = dsp;
  #ifndef VMS
+ #ifdef atarist
+ 	    if((ep = rindex(nam, '\\')) == NULL)
+ 		ep = rindex(nam, '/');
+ #else
  	    ep = rindex (nam, '/');
+ #endif
  #else				/* VMS */
  	    ep = rindex (nam, ']');
  	    if (ep == NULL) ep = rindex (nam, '>');
***************
*** 3726,3734 ****
--- 3888,3910 ----
  
    /* If specified file name is absolute, just open it.  */
  
+ #ifdef atarist
+   if ((*fbeg == '\\') || (*fbeg == '/')) {
+     if(fbeg[2] == ':')
+     { /* allow "\D:\xxx" */
+         strncpy (fname, fbeg+1, flen-1);
+         fname[flen-1] = 0;
+     }
+     else
+     {  /* allow "\lib\xxx" == "\currentdrive:\lib\xxx" */
+         strncpy (fname, fbeg, flen);
+         fname[flen] = 0;
+     }
+ #else
    if (*fbeg == '/') {
      strncpy (fname, fbeg, flen);
      fname[flen] = 0;
+ #endif
      if (importing)
        f = lookup_import (fname);
      else
***************
*** 3747,3753 ****
--- 3923,3933 ----
  	if (searchptr->fname[0] == 0)
  	  continue;
  	strcpy (fname, searchptr->fname);
+ #ifdef atarist
+ 	strcat (fname, "\\");
+ #else
  	strcat (fname, "/");
+ #endif
  	fname[strlen (fname) + flen] = 0;
        } else {
  	fname[0] = 0;
***************
*** 6627,6634 ****
--- 6807,6818 ----
    check_expand (op, len + 1);
    if (op->bufp > op->buf && op->bufp[-1] != '\n')
      *op->bufp++ = '\n';
+ #ifdef atarist
+   op->bufp = slashifying_bcopy (line_cmd_buf, op->bufp, len);
+ #else
    bcopy (line_cmd_buf, op->bufp, len);
    op->bufp += len;
+ #endif
    op->lineno = ip->lineno;
  }
  
***************
*** 8199,8204 ****
--- 8383,8389 ----
    deps_buffer[deps_size] = 0;
  }
  
+ #if (!(defined(atarist) || defined(atariminix)))
  #if defined(USG) || defined(VMS)
  #ifndef BSTRING
  
***************
*** 8266,8272 ****
  }
  #endif /* not BSTRING */
  #endif /* USG or VMS */
! 
  
  static void
  fatal (str, arg)
--- 8451,8457 ----
  }
  #endif /* not BSTRING */
  #endif /* USG or VMS */
! #endif /* any atari */
  
  static void
  fatal (str, arg)
*** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/cp-tree.c	Tue Feb  4 10:32:23 1992
--- cp-tree.c	Fri Mar  6 15:18:09 1992
***************
*** 1619,1624 ****
--- 1619,1625 ----
    print_class_statistics ();
  }
  
+ #ifndef atarist
  /* This is used by the `assert' macro.  It is provided in libgcc.a,
     which `cc' doesn't know how to link.  */
  void
***************
*** 1639,1641 ****
--- 1640,1643 ----
    fflush (stderr);
    abort ();
  }
+ #endif
*** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/cp-xref.c	Fri Jan 17 17:58:44 1992
--- cp-xref.c	Fri Mar  6 15:18:03 1992
***************
*** 229,235 ****
  
    if (wd_name == NULL)
      {
! #if defined(USG) || defined(VMS)
        getcwd(wdbuf, sizeof(wdbuf));
  #else
        getwd(wdbuf);
--- 229,235 ----
  
    if (wd_name == NULL)
      {
! #if defined(USG) || defined(VMS) || defined(CROSSHPUX)
        getcwd(wdbuf, sizeof(wdbuf));
  #else
        getwd(wdbuf);
*** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/dbxout.c	Fri Feb 21 02:06:52 1992
--- dbxout.c	Fri Mar  6 15:17:58 1992
***************
*** 107,113 ****
     BSD systems) now provides getcwd as called for by POSIX.  Allow for
     the few exceptions to the general rule here.  */
  
! #if !(defined (USG) || defined (VMS))
  extern char *getwd ();
  #define getcwd(buf,len) getwd(buf)
  #define GUESSPATHLEN (MAXPATHLEN + 1)
--- 107,113 ----
     BSD systems) now provides getcwd as called for by POSIX.  Allow for
     the few exceptions to the general rule here.  */
  
! #if !(defined (USG) || defined (VMS) || defined(CROSSHPUX))
  extern char *getwd ();
  #define getcwd(buf,len) getwd(buf)
  #define GUESSPATHLEN (MAXPATHLEN + 1)
***************
*** 131,138 ****
  #if defined (USG) || defined (MIPS)
  #include "gstab.h"  /* If doing DBX on sysV, use our own stab.h.  */
  #else
  #include <stab.h>  /* On BSD, use the system's stab.h.  */
! 
  /* This is a GNU extension we need to reference in this file.  */
  #ifndef N_CATCH
  #define N_CATCH 0x54
--- 131,141 ----
  #if defined (USG) || defined (MIPS)
  #include "gstab.h"  /* If doing DBX on sysV, use our own stab.h.  */
  #else
+ #if defined(CROSSATARI) || defined(atarist) || defined(atariminix)
+ #include "astab.h"
+ #else
  #include <stab.h>  /* On BSD, use the system's stab.h.  */
! #endif
  /* This is a GNU extension we need to reference in this file.  */
  #ifndef N_CATCH
  #define N_CATCH 0x54
***************
*** 415,422 ****
--- 418,431 ----
  #ifdef DBX_OUTPUT_MAIN_SOURCE_DIRECTORY
  	DBX_OUTPUT_MAIN_SOURCE_DIRECTORY (asmfile, cwd);
  #else /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
+ #ifndef atarist
  	fprintf (asmfile, "%s \"%s/\",%d,0,0,%s\n", ASM_STABS_OP,
  		 cwd, N_SO, &ltext_label_name[1]);
+ #else
+ 	fprintf (asmfile, "%s \"", ASM_STABS_OP);
+ 	atari_output_filename(asmfile, cwd);
+ 	fprintf (asmfile, "\\\\\",%d,0,0,%s\n", N_SO, &ltext_label_name[1]);
+ #endif
  #endif /* no DBX_OUTPUT_MAIN_SOURCE_DIRECTORY */
        }
    }
***************
*** 429,436 ****
--- 438,451 ----
    /* We include outputting `Ltext:' here,
       because that gives you a way to override it.  */
    /* Used to put `Ltext:' before the reference, but that loses on sun 4.  */
+ #ifndef atarist
    fprintf (asmfile, "%s \"%s\",%d,0,0,%s\n", ASM_STABS_OP, input_file_name,
  	   N_SO, &ltext_label_name[1]);
+ #else
+   fprintf (asmfile, "%s \"", ASM_STABS_OP);
+   atari_output_filename(asmfile, input_file_name);
+   fprintf(asmfile, "\",%d,0,0,%s\n", N_SO, &ltext_label_name[1]);
+ #endif
    text_section ();
    ASM_OUTPUT_INTERNAL_LABEL (asmfile, "Ltext", 0);
  #endif /* no DBX_OUTPUT_MAIN_SOURCE_FILENAME */
***************
*** 496,503 ****
--- 511,524 ----
        DBX_OUTPUT_SOURCE_FILENAME (file, filename);
  #else
        ASM_GENERATE_INTERNAL_LABEL (ltext_label_name, "Ltext", 0);
+ #ifndef atarist
        fprintf (file, "%s \"%s\",%d,0,0,%s\n", ASM_STABS_OP,
  	       filename, N_SOL, &ltext_label_name[1]);
+ #else
+       fprintf (file, "%s \"", ASM_STABS_OP);
+       atari_output_filename(file, filename);
+       fprintf (file, "\",%d,0,0,%s\n", N_SOL, &ltext_label_name[1]);
+ #endif
  #endif
        lastfile = filename;
      }
*** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/final.c	Sat Feb  8 18:20:40 1992
--- final.c	Fri Mar  6 15:18:04 1992
***************
*** 67,74 ****
--- 67,78 ----
  #ifdef USG
  #include "gstab.h"  /* If doing DBX on sysV, use our own stab.h.  */
  #else
+ #if defined(CROSSATARI) || defined(atarist) || defined(atariminix)
+ #include "astab.h"
+ #else
  #include <stab.h>  /* On BSD, use the system's stab.h.  */
  #endif /* not USG */
+ #endif /* not atari */
  #endif /* DBX_DEBUGGING_INFO */
  
  /* .stabd code for line number.  */
*** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/gcc.c	Sat Feb 22 02:09:34 1992
--- gcc.c	Fri Mar  6 15:17:57 1992
***************
*** 30,35 ****
--- 30,44 ----
  Once it knows which kind of compilation to perform, the procedure for
  compilation is specified by a string called a "spec".  */
  
+ #ifdef CROSSATARI
+ #ifdef atarist
+ #undef atarist
+ #endif
+ #ifdef atariminix
+ #undef atariminix
+ #endif
+ #endif
+   
  #include <stdio.h>
  #include <sys/types.h>
  #include <ctype.h>
***************
*** 36,47 ****
  #include <signal.h>
  #include <sys/file.h>
  #include <sys/stat.h>
  
  #include "config.h"
  #include "obstack.h"
  #include "gvarargs.h"
  
! #ifdef USG
  #ifndef R_OK
  #define R_OK 4
  #define W_OK 2
--- 45,59 ----
  #include <signal.h>
  #include <sys/file.h>
  #include <sys/stat.h>
+ #ifdef CROSSATARI
+ #include <ctype.h>
+ #endif
  
  #include "config.h"
  #include "obstack.h"
  #include "gvarargs.h"
  
! #if (defined(USG) || defined(atariminix))
  #ifndef R_OK
  #define R_OK 4
  #define W_OK 2
***************
*** 78,83 ****
--- 90,102 ----
  #endif
  #endif
  
+ #ifdef atarist
+ #include <osbind.h>
+ #include <ctype.h>
+ #include <fcntl.h>		/* fgth, for redirection of stderr */
+ long _stksize = 8192;
+ #endif
+ 
  #define obstack_chunk_alloc xmalloc
  #define obstack_chunk_free free
  
***************
*** 383,388 ****
--- 402,410 ----
          -undef -D__GNUC__=2 %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
  	%{!undef:%{!ansi:%p} %P} %{trigraphs}\
          %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
+         %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
+         %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
+         %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
          %i %{!M:%{!MM:%{!E:%{!pipe:%g.cpp}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\
***************
*** 392,398 ****
  		   %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
  		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!               %{!S:as %{R} %{j} %{J} %{h} %{d2} %a \
  		      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
                        %{!pipe:%g.s} %A\n }}}}"},
    {"-",
--- 414,420 ----
  		   %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
  		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!               %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a \
  		      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
                        %{!pipe:%g.s} %A\n }}}}"},
    {"-",
***************
*** 402,407 ****
--- 424,432 ----
          -undef -D__GNUC__=2 %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
  	%{!undef:%{!ansi:%p} %P} %{trigraphs}\
          %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
+         %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
+         %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
+         %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
          %i %W{o*}}\
***************
*** 414,419 ****
--- 439,447 ----
          -undef -D__OBJC__ -D__GNUC__=2 %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
  	%{!undef:%{!ansi:%p} %P} %{trigraphs}\
          %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
+         %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
+         %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
+         %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
          %i %{!M:%{!MM:%{!E:%{!pipe:%g.cpp}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\
***************
*** 424,430 ****
      		   -lang-objc %{gen-decls} \
  		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!               %{!S:as %{R} %{j} %{J} %{h} %{d2} %a \
  		      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
                        %{!pipe:%g.s} %A\n }}}}"},
    {".h", "@c-header"},
--- 452,458 ----
      		   -lang-objc %{gen-decls} \
  		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!               %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a \
  		      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
                        %{!pipe:%g.s} %A\n }}}}"},
    {".h", "@c-header"},
***************
*** 436,441 ****
--- 464,472 ----
          -undef -D__GNUC__=2 %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
  	%{!undef:%{!ansi:%p} %P} %{trigraphs}\
          %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
+         %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
+         %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
+         %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
          %i %W{o*}"},
***************
*** 449,454 ****
--- 480,488 ----
  	-undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus \
  	%{ansi:-trigraphs -$ -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
          %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
+         %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
+         %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
+         %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
          %{traditional-cpp:-traditional} %{trigraphs}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
          %i %{!M:%{!MM:%{!E:%{!pipe:%g.cpp}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\
***************
*** 458,464 ****
  		   %{v:-version} %{pg:-p} %{p} %{f*}\
  		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!               %{!S:as %{R} %{j} %{J} %{h} %{d2} %a \
  		      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
                        %{!pipe:%g.s} %A\n }}}}"},
    {".i", "@cpp-output"},
--- 492,498 ----
  		   %{v:-version} %{pg:-p} %{p} %{f*}\
  		   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  		   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!               %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a \
  		      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
                        %{!pipe:%g.s} %A\n }}}}"},
    {".i", "@cpp-output"},
***************
*** 468,474 ****
  	%{v:-version} %{pg:-p} %{p} %{f*}\
  	%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  	%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!     %{!S:as %{R} %{j} %{J} %{h} %{d2} %a \
              %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %{!pipe:%g.s} %A\n }"},
    {".ii", "@c++-cpp-output"},
    {"@c++-cpp-output",
--- 502,508 ----
  	%{v:-version} %{pg:-p} %{p} %{f*}\
  	%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  	%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!     %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a \
              %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %{!pipe:%g.s} %A\n }"},
    {".ii", "@c++-cpp-output"},
    {"@c++-cpp-output",
***************
*** 477,488 ****
  	    %{v:-version} %{pg:-p} %{p} %{f*}\
  	    %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  	    %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!        %{!S:as %{R} %{j} %{J} %{h} %{d2} %a \
  	       %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
  	       %{!pipe:%g.s} %A\n }"},
    {".s", "@assembler"},
    {"@assembler",
!    "%{!S:as %{R} %{j} %{J} %{h} %{d2} %a \
              %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %i %A\n }"},
    {".S", "@assembler-with-cpp"},
    {"@assembler-with-cpp",
--- 511,522 ----
  	    %{v:-version} %{pg:-p} %{p} %{f*}\
  	    %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  	    %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
!        %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a \
  	       %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
  	       %{!pipe:%g.s} %A\n }"},
    {".s", "@assembler"},
    {"@assembler",
!    "%{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a \
              %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %i %A\n }"},
    {".S", "@assembler-with-cpp"},
    {"@assembler-with-cpp",
***************
*** 491,500 ****
  	%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{trigraphs} \
          -undef -$ %{!undef:%p %P} -D__ASSEMBLER__ \
          %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
          %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\
!     %{!M:%{!MM:%{!E:%{!S:as %{R} %{j} %{J} %{h} %{d2} %a \
                      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
  		    %{!pipe:%g.s} %A\n }}}}"},
    /* Mark end of table */
--- 525,537 ----
  	%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{trigraphs} \
          -undef -$ %{!undef:%p %P} -D__ASSEMBLER__ \
          %c %{O*:-D__OPTIMIZE__} %{traditional} %{ftraditional:-traditional}\
+         %{mshort:-D__MSHORT__} %{mint:-D__MINT__}\
+         %{m68881:-D__M68881__} %{m68020:-D__M68020__}\
+         %{mc68881:-D__M68881__} %{mc68020:-D__M68020__}\
          %{traditional-cpp:-traditional}\
  	%{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C\
          %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n\
!     %{!M:%{!MM:%{!E:%{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a \
                      %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
  		    %{!pipe:%g.s} %A\n }}}}"},
    /* Mark end of table */
***************
*** 508,513 ****
--- 545,559 ----
  
  /* Here is the spec for running the linker, after compiling all files.  */
  
+ #if (defined(CROSSATARI) || defined(atarist) || defined(atariminix))
+ static char *link_command_spec = 
+  "%{!c:%{!M*:%{!E:%{!S:ld %{v} %{G} %{o*} %l\
+  %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\
+  %{y*} %{!nostdlib:%S} \
+  %{L*} %o %{!nostdlib:%s %L}\n }}}}";
+ 
+ #else
+ 
  #ifdef LINK_LIBGCC_SPECIAL
  /* Have gcc do the search.  */
  static char *link_command_spec = "\
***************
*** 523,528 ****
--- 569,575 ----
  			%{!A:%{!nostdlib:%S}} \
  			%{L*} %D %o %{!nostdlib:-lgcc %L -lgcc %{!A:%E}}\n }}}}}";
  #endif
+ #endif
  
  /* A vector of options to give to the linker.
     These options are accumlated by %x
***************
*** 530,535 ****
--- 577,583 ----
  static int n_linker_options;
  static char **linker_options;
  
+ #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
  /* Read compilation specs from a file named FILENAME,
     replacing the default ones.
  
***************
*** 667,672 ****
--- 715,721 ----
  
    return p;
  }
+ #endif /* ataris */
  
  /* Structure to keep track of the specs that have been defined so far.  These
     are accessed using %Sspecname in a compiler or link spec. */
***************
*** 766,771 ****
--- 815,827 ----
  /* Name with which this program was invoked.  */
  
  static char *programname;
+ 
+ #ifdef atarist
+ /* Flag indicating, that stderr should be redirected for the child
+    processes */
+ 
+ unsigned char zflag;
+ #endif
  
  /* Structures to keep track of prefixes to try when looking for files. */
  
***************
*** 1011,1019 ****
  static void
  choose_temp_base ()
  {
-   char *base = getenv ("TMPDIR");
    int len;
  
    if (base == (char *)0)
      {
  #ifdef P_tmpdir
--- 1067,1092 ----
  static void
  choose_temp_base ()
  {
    int len;
+ #if (!(defined(atarist) || defined(atariminix)))
+   char *base = getenv ("TMPDIR");
+ #else
+   char *base = getenv ("TEMP");
  
+   if(base == (char *)0)
+   {
+       base = getenv("TMPDIR");
+       if(base == (char *)0)
+       base = getenv("TMP");
+   }
+   if(base != (char *)0)
+   {
+       char *newbase = alloca(FILENAME_MAX);
+       dos2unx(base,newbase);
+       base = newbase;
+   }
+ #endif
+ 
    if (base == (char *)0)
      {
  #ifdef P_tmpdir
***************
*** 1032,1038 ****
    len = strlen (base);
    temp_filename = xmalloc (len + sizeof("/ccXXXXXX"));
    strcpy (temp_filename, base);
!   if (len > 0 && temp_filename[len-1] != '/')
      temp_filename[len++] = '/';
    strcpy (temp_filename + len, "ccXXXXXX");
  
--- 1105,1115 ----
    len = strlen (base);
    temp_filename = xmalloc (len + sizeof("/ccXXXXXX"));
    strcpy (temp_filename, base);
!   if (len > 0 && (temp_filename[len-1] != '/' 
! #ifdef atarist
! 		  || temp_filename[len-1] != '\\'
! #endif
!  		  ))
      temp_filename[len++] = '/';
    strcpy (temp_filename + len, "ccXXXXXX");
  
***************
*** 1051,1057 ****
       int mode;
  {
    char *temp;
!   char *file_suffix = (mode & X_OK != 0 ? EXECUTABLE_SUFFIX : "");
    struct prefix_list *pl;
    int len = pprefix->max_len + strlen (name) + strlen (file_suffix) + 1;
  
--- 1128,1134 ----
       int mode;
  {
    char *temp;
!   char *file_suffix = ((mode & X_OK) != 0 ? EXECUTABLE_SUFFIX : "");
    struct prefix_list *pl;
    int len = pprefix->max_len + strlen (name) + strlen (file_suffix) + 1;
  
***************
*** 1273,1278 ****
--- 1350,1356 ----
  
  #else /* not __MSDOS__ */
  
+ #ifndef atarist
  static int
  pexecute (func, program, argv, not_last)
       char *program;
***************
*** 1360,1365 ****
--- 1438,1444 ----
      }
  }
  
+ #endif /* not atarist */
  #endif /* not __MSDOS__ */
  
  /* Execute the command specified by the arguments on the current line of spec.
***************
*** 1378,1393 ****
      {
        char *prog;		/* program name.  */
        char **argv;		/* vector of args.  */
        int pid;			/* pid of process for this command.  */
      };
  
    struct command *commands;	/* each command buffer with above info.  */
  
    /* Count # of piped commands.  */
    for (n_commands = 1, i = 0; i < argbuf_index; i++)
      if (strcmp (argbuf[i], "|") == 0)
        n_commands++;
! 
    /* Get storage for each command.  */
    commands
      = (struct command *) alloca (n_commands * sizeof (struct command));
--- 1457,1477 ----
      {
        char *prog;		/* program name.  */
        char **argv;		/* vector of args.  */
+ #ifndef atarist
        int pid;			/* pid of process for this command.  */
+ #endif
      };
  
    struct command *commands;	/* each command buffer with above info.  */
  
+ #ifndef atarist
    /* Count # of piped commands.  */
    for (n_commands = 1, i = 0; i < argbuf_index; i++)
      if (strcmp (argbuf[i], "|") == 0)
        n_commands++;
! #else
!   n_commands = 1;
! #endif
    /* Get storage for each command.  */
    commands
      = (struct command *) alloca (n_commands * sizeof (struct command));
***************
*** 1402,1407 ****
--- 1486,1492 ----
    if (string)
      commands[0].argv[0] = string;
  
+ #ifndef atarist
    for (n_commands = 1, i = 0; i < argbuf_index; i++)
      if (strcmp (argbuf[i], "|") == 0)
        {				/* each command.  */
***************
*** 1416,1421 ****
--- 1501,1509 ----
  	  commands[n_commands].argv[0] = string;
  	n_commands++;
        }
+ #else
+   n_commands = 1;
+ #endif
  
    argbuf[argbuf_index] = 0;
  
***************
*** 1431,1439 ****
--- 1519,1529 ----
  	  for (j = commands[i].argv; *j; j++)
  	    fprintf (stderr, " %s", *j);
  
+ #ifndef atarist
  	  /* Print a pipe symbol after all but the last command.  */
  	  if (i + 1 != n_commands)
  	    fprintf (stderr, " |");
+ #endif
  	  fprintf (stderr, "\n");
  	}
        fflush (stderr);
***************
*** 1448,1458 ****
--- 1538,1550 ----
  #endif /* DEBUG */
      }
  
+ #ifndef atarist
    /* Run each piped subprocess.  */
  
    last_pipe_input = STDIN_FILE_NO;
    for (i = 0; i < n_commands; i++)
      {
+ #ifndef atariminix
        char *string = commands[i].argv[0];
  
        commands[i].pid = pexecute ((string != commands[i].prog ? execv : execvp),
***************
*** 1459,1464 ****
--- 1551,1564 ----
  				  string, commands[i].argv,
  				  i + 1 < n_commands);
  
+ #else
+       extern int execv();
+       char *string = commands[i].argv[0];
+ 
+       commands[i].pid = pexecute (execv,
+ 				  string, commands[i].argv,
+ 				  i + 1 < n_commands);
+ #endif
        if (string != commands[i].prog)
  	free (string);
      }
***************
*** 1502,1507 ****
--- 1602,1652 ----
        }
      return ret_code;
    }
+ #else /* atarist */
+  {
+      register int iii;
+      int errfd, oldfd;
+      char **j;
+ 
+      execution_count++;
+ 
+      if (zflag)
+        {
+ 	 errfd = Fopen("compile.err", 2);
+ 	 if (errfd < __SMALLEST_VALID_HANDLE)
+ 	   errfd = Fcreate("compile.err", 0);
+ 	 else
+ 	   Fseek(0L, errfd, 2);
+ 	 if (errfd >= __SMALLEST_VALID_HANDLE)
+ 	   {
+ 	     oldfd = Fdup (2);
+ 	     Fforce(2, errfd);
+ 	   }
+ 	 else
+ 	   {
+ 	     error("cannot open %s", "compile.err");
+ 	     zflag = 0;		/* no redirection */
+ 	   }
+        }
+      for (i = 0; i < n_commands ; i++)
+      {
+          j = commands[i].argv;
+          iii = spawnve(0, j[0], j, NULL);
+ 	 if(iii != 0)
+ 	     break;
+      }
+      if (zflag)
+        {
+ 	 Fforce(2, oldfd);
+ 	 Fclose(oldfd);
+ 	 Fclose(errfd);
+        }
+      if (iii != 0)
+        return -1;
+      else
+        return 0;
+  }
+ #endif /* atarist */  
  }
  
  /* Find all the switches given to us
***************
*** 1770,1775 ****
--- 1915,1926 ----
  		  save_temps_flag = 1;
  		  break;
  		}
+ #ifdef atarist
+ 	    case 'z':	/* redirect stderr to a file */
+ 	      zflag++;
+ 	      n_switches++;
+ 	      break;
+ #endif
  	    default:
  	      n_switches++;
  
***************
*** 1941,1946 ****
--- 2092,2106 ----
     search dirs for it.  */
  static int this_is_library_file;
  
+ #ifdef atarist
+ /* I don't know why this is necessary.  Recursive calls to do_spec_1
+    end up ignoring the error code from calls to execute().  That causes
+    do_spec to get a 0 return value, and do_spec_1("\n"), which causes the
+    command to get executed again.
+ */
+ int execute_return_error = 0;
+ #endif
+ 
  /* Process the spec SPEC and run the commands specified therein.
     Returns 0 if the spec is successfully processed; -1 if failed.  */
  
***************
*** 1960,1969 ****
--- 2120,2138 ----
  
    /* Force out any unfinished command.
       If -pipe, this forces out the last command if it ended in `|'.  */
+ #ifdef atarist
+   if (!value && execute_return_error)
+ 	{
+ 	value = execute_return_error;
+ 	execute_return_error = 0;
+ 	}
+ #endif
    if (value == 0)
      {
+ #ifndef atarist
        if (argbuf_index > 0 && !strcmp (argbuf[argbuf_index - 1], "|"))
  	argbuf_index--;
+ #endif
  
        if (argbuf_index > 0)
  	value = execute ();
***************
*** 2000,2005 ****
--- 2169,2225 ----
         Otherwise, NL, SPC, TAB and % are special.  */
      switch (inswitch ? 'a' : c)
        {
+ #if (defined(atarist) || defined(CROSSATARI))
+ /* this stuff added by jrd.  if see '$', expect name of env var, delimited
+    by '$'.  Find it's value, and subst it in.
+ 
+    modified by ERS to only collect things that look like names; this
+    saves e.g. the -$ arg. to cpp from getting munged */
+ 
+       case '$':
+       {
+ 	char varname[32];		/* should be enough */
+ 	char * value;			/* deciphered value string */
+ 	char *temp;
+ 	int i;
+ 	extern char *getenv(), *index();
+ 	
+ 	for (i = 0 ; ((c = *p) != '$') && isalnum(c) && i < 31 ; i++, p++)
+ 		varname[i] = c;
+ 	varname[i] = '\0';
+ 	if (strlen(varname) > 0) /* ++jrb fix */
+ 	{
+              	++p;    /* skip trailing '$' */
+ 		value = getenv(varname); /* ++jrb fix */
+ 		if (value)
+ 		{ /* if value is a path, only consider 1'st component */
+ #ifdef atarist
+ 			if((temp = index(value, ',')) == NULL)
+ 			    temp = index(value, ';');
+ #else
+ 			temp = index(value, ':');
+ #endif
+ 			if(temp != NULL)
+ 			{
+ 			    char *t = (char *) alloca(strlen(value) + 1);
+ 			    strcpy(t, value);
+ 			    t[temp-value] = '\0';
+ 			    do_spec_1(t, 0);
+ 			}
+ 			else
+ 			    do_spec_1(value, 0);
+ 		}
+ 		    else
+ 			do_spec_1(".", 0);	/* a compleat kludge... */
+ 	}
+         else
+         {
+              obstack_1grow(&obstack, '$');
+              arg_going = 1;
+         }
+       }
+      break;
+ #endif /* atarist */
        case '\n':
  	/* End of line: finish any pending argument,
  	   then run the pending command if one has been started.  */
***************
*** 2037,2042 ****
--- 2257,2266 ----
  	if (argbuf_index > 0)
  	  {
  	    int value = execute ();
+ #ifdef atarist
+ 		if (!execute_return_error)
+ 			execute_return_error = value;
+ #endif
  	    if (value)
  	      return value;
  	  }
***************
*** 2521,2533 ****
--- 2745,2765 ----
  	    break;
  
  	  default:
+ #if 1 /* atarist */
+ 	    fprintf(stderr, "Bogus char '%c' found at pos %d of spec '%s'\n",
+ 		c, (p - spec - 1), spec);
+ #endif
  	    abort ();
  	  }
  	break;
  
+ #ifndef atarist
+       /* on the atari it is important to preserve backslash in spec */
+       /* so just let it go into default case */
        case '\\':
  	/* Backslash: treat next character as ordinary.  */
  	c = *p++;
+ #endif
  
  	/* fall through */
        default:
***************
*** 2794,2799 ****
--- 3026,3032 ----
  
  /* On fatal signals, delete all the temporary files.  */
  
+ #ifndef atarist
  static void
  fatal_error (signum)
       int signum;
***************
*** 2805,2810 ****
--- 3038,3044 ----
       so its normal effect occurs.  */
    kill (getpid (), signum);
  }
+ #endif
  
  int
  main (argc, argv)
***************
*** 2818,2823 ****
--- 3052,3062 ----
    char *explicit_link_files;
    char *specs_file;
  
+ #ifdef atarist
+ /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
+ /*  _malloczero(1); */ 	/* zero mallocs by default */
+   programname = "gcc";
+ #else  
    programname = argv[0];
  
    if (signal (SIGINT, SIG_IGN) != SIG_IGN)
***************
*** 2830,2835 ****
--- 3069,3075 ----
    if (signal (SIGPIPE, SIG_IGN) != SIG_IGN)
      signal (SIGPIPE, fatal_error);
  #endif
+ #endif /* atarist */
  
    argbuf_length = 10;
    argbuf = (char **) xmalloc (argbuf_length * sizeof (char *));
***************
*** 2846,2851 ****
--- 3086,3100 ----
  
    process_command (argc, argv);
  
+ #if (defined(atarist) || defined(CROSSATARI))
+   {
+     char *temp;
+     
+     if((temp = getenv ("GCCEXEC")))
+ 	add_prefix (&exec_prefix, temp, 0, 0, 0);
+   }
+ #endif
+   
    /* Initialize the vector of specs to just the default.
       This means one element containing 0s, as a terminator.  */
  
***************
*** 2853,2858 ****
--- 3102,3111 ----
    bcopy (default_compilers, compilers, sizeof default_compilers);
    n_compilers = n_default_compilers;
  
+ 
+ #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
+   specs_file = 0;
+ #else
    /* Read specs from a file if there is one.  */
  
    machine_suffix = concat (spec_machine, "/", concat (spec_version, "/", ""));
***************
*** 2861,2866 ****
--- 3114,3120 ----
    /* Read the specs file unless it is a default one.  */
    if (specs_file != 0 && strcmp (specs_file, "specs"))
      read_specs (specs_file);
+ #endif
  
    /* Now we have the specs.
       Set the `valid' bits for switches that match anything in any spec.  */
***************
*** 2877,2883 ****
--- 3131,3143 ----
  
    if (verbose_flag)
      {
+ #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
+ #include "PatchLev.h"
+       fprintf (stderr, "gcc-atariST version %s Patchlevel %s\n",
+ 	       version_string, PatchLevel);
+ #else
        fprintf (stderr, "gcc version %s\n", version_string);
+ #endif
        if (n_infiles == 0)
  	exit (0);
      }
***************
*** 2924,2930 ****
--- 3184,3195 ----
  
  	  input_basename = input_filename;
  	  for (p = input_filename; *p; p++)
+ #ifdef atarist
+ 		if (((*p == '/') || (*p == '\\')) && (*(p-1) != ':'))
+ 		    /* allow both '\' and '/' with  our new lib */
+ #else
  	    if (*p == '/')
+ #endif
  	      input_basename = p + 1;
  
  	  /* Find a suffix starting with the last period,
*** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/libgcc1.c	Fri Feb 14 22:39:14 1992
--- libgcc1.c	Fri Mar  6 15:17:56 1992
***************
*** 201,207 ****
  #endif
  
  #ifndef perform_lesf2
! #define perform_lesf2(a, b) return 1 - (a >= b);
  #endif
  
  /* Define the C data type to use for an SImode value.  */
--- 201,207 ----
  #endif
  
  #ifndef perform_lesf2
! #define perform_lesf2(a, b) return 1 - (a <= b);
  #endif
  
  /* Define the C data type to use for an SImode value.  */
*** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/protoize.c	Tue Feb 18 15:42:08 1992
--- protoize.c	Fri Mar  6 15:18:02 1992
***************
*** 150,156 ****
     BSD systems) now provides getcwd as called for by POSIX.  Allow for
     the few exceptions to the general rule here.  */
  
! #if !(defined (USG) || defined (VMS))
  extern char *getwd ();
  #define getcwd(buf,len) getwd(buf)
  #else /* (defined (USG) || defined (VMS)) */
--- 150,156 ----
     BSD systems) now provides getcwd as called for by POSIX.  Allow for
     the few exceptions to the general rule here.  */
  
! #if !(defined (USG) || defined (VMS) || defined(CROSSHPUX))
  extern char *getwd ();
  #define getcwd(buf,len) getwd(buf)
  #else /* (defined (USG) || defined (VMS)) */
*** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/toplev.c	Tue Feb 18 20:07:07 1992
--- toplev.c	Fri Mar  6 15:17:59 1992
***************
*** 31,37 ****
  
  #include <sys/stat.h>
  
! #ifdef USG
  #undef FLOAT
  #include <sys/param.h>
  /* This is for hpux.  It is a real screw.  They should change hpux.  */
--- 31,37 ----
  
  #include <sys/stat.h>
  
! #if defined(USG) || defined(CROSSHPUX)
  #undef FLOAT
  #include <sys/param.h>
  /* This is for hpux.  It is a real screw.  They should change hpux.  */
***************
*** 41,51 ****
--- 41,59 ----
  #undef FFS  /* Some systems define this in param.h.  */
  #else
  #ifndef VMS
+ #if (!(defined(atarist) || defined(atariminix)))
  #include <sys/time.h>
  #include <sys/resource.h>
+ #endif /* !(atarist || atariminix) */
  #endif
  #endif
  
+ #ifdef atariminix
+ #include <sys/times.h>
+ /* #include <minix/const.h>, avoid dragging this in */
+ #define HZ 60	/* this is the only thing needed from minix/const.h */
+ #endif
+ 
  #include "input.h"
  #include "tree.h"
  /* #include "c-tree.h" */
***************
*** 52,57 ****
--- 60,74 ----
  #include "rtl.h"
  #include "flags.h"
  #include "insn-attr.h"
+ 
+ #ifdef atarist
+ long _stksize = -1L;	/* for all sizes of ST's */
+ 	/* -1 means malloc from own heap and keep all  of memory */
+ #endif /* atarist */
+ 
+ #if (defined(atarist) || defined(atariminix))
+ #include "astab.h"	/* need this for ASM_OUTPUT_SOURCE_FILENAME */
+ #endif
  
  #ifdef VMS
  /* The extra parameters substantially improve the I/O performance.  */
***************
*** 578,584 ****
  int
  get_run_time ()
  {
! #ifdef USG
    struct tms tms;
  #else
  #ifndef VMS
--- 595,604 ----
  int
  get_run_time ()
  {
! #ifdef atarist
!   long now;
! #else
! #if (defined(USG) || defined(atariminix) || defined(CROSSHPUX))
    struct tms tms;
  #else
  #ifndef VMS
***************
*** 593,603 ****
      } vms_times;
  #endif
  #endif
  
    if (quiet_flag)
      return 0;
  
! #ifdef USG
    times (&tms);
    return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
  #else
--- 613,627 ----
      } vms_times;
  #endif
  #endif
+ #endif
  
    if (quiet_flag)
      return 0;
  
! #ifdef atarist
!   return(time(NULL) * 1000000);
! #else
! #if (defined(USG) || defined(atariminix) || defined(CROSSHPUX))
    times (&tms);
    return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
  #else
***************
*** 610,615 ****
--- 634,640 ----
    return (vms_times.proc_user_time + vms_times.proc_system_time) * 10000;
  #endif
  #endif
+ #endif
  }
  
  #define TIMEVAR(VAR, BODY)    \
***************
*** 1212,1217 ****
--- 1237,1243 ----
    longjmp (float_handler, 1);
  }
  
+ #ifndef atarist
  /* Handler for SIGPIPE.  */
  
  static void
***************
*** 1221,1226 ****
--- 1247,1253 ----
  {
    fatal ("output pipe has been closed");
  }
+ #endif
  
  /* Strip off a legitimate source ending from the input string NAME of
     length LEN. */
***************
*** 1372,1378 ****
--- 1399,1409 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".jump");
+ #else
+       strcat (dumpname, ".jmp");
+ #endif
        jump_opt_dump_file = fopen (dumpname, "w");
        if (jump_opt_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1394,1400 ****
--- 1425,1435 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".loop");
+ #else
+       strcat (dumpname, ".lop");
+ #endif
        loop_dump_file = fopen (dumpname, "w");
        if (loop_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1405,1411 ****
--- 1440,1450 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".cse2");
+ #else
+       strcat (dumpname, ".cs2");
+ #endif
        cse2_dump_file = fopen (dumpname, "w");
        if (cse2_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1416,1422 ****
--- 1455,1465 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".flow");
+ #else
+       strcat (dumpname, ".flo");
+ #endif
        flow_dump_file = fopen (dumpname, "w");
        if (flow_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1427,1433 ****
--- 1470,1480 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 10);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".combine");
+ #else
+       strcat (dumpname, ".cmb");
+ #endif
        combine_dump_file = fopen (dumpname, "w");
        if (combine_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1438,1444 ****
--- 1485,1495 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 7);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".sched");
+ #else
+       strcat (dumpname, ".sch");
+ #endif
        sched_dump_file = fopen (dumpname, "w");
        if (sched_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1449,1455 ****
--- 1500,1510 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".lreg");
+ #else
+       strcat (dumpname, ".lrg");
+ #endif
        local_reg_dump_file = fopen (dumpname, "w");
        if (local_reg_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1460,1466 ****
--- 1515,1525 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".greg");
+ #else
+       strcat (dumpname, ".grg");
+ #endif
        global_reg_dump_file = fopen (dumpname, "w");
        if (global_reg_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1471,1477 ****
--- 1530,1540 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 8);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".sched2");
+ #else
+       strcat (dumpname, ".sc2");
+ #endif
        sched2_dump_file = fopen (dumpname, "w");
        if (sched2_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1482,1488 ****
--- 1545,1555 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 7);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".jump2");
+ #else
+       strcat (dumpname, ".jp2");
+ #endif
        jump2_opt_dump_file = fopen (dumpname, "w");
        if (jump2_opt_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 1506,1512 ****
--- 1573,1583 ----
      {
        register char *dumpname = (char *) xmalloc (dump_base_name_length + 10);
        strcpy (dumpname, dump_base_name);
+ #ifndef atarist
        strcat (dumpname, ".stack");
+ #else
+       strcat (dumpname, ".stk");
+ #endif
        stack_reg_dump_file = fopen (dumpname, "w");
        if (stack_reg_dump_file == 0)
  	pfatal_with_name (dumpname);
***************
*** 2484,2495 ****
--- 2555,2576 ----
    int version_flag = 0;
    char *p;
  
+ #ifdef atarist
+ /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
+ /*  _malloczero(1); */ 	/* zero mallocs by default */
+ #endif  
+ 
    /* save in case md file wants to emit args as a comment.  */
    save_argc = argc;
    save_argv = argv;
  
    p = argv[0] + strlen (argv[0]);
+ #ifndef atarist
    while (p != argv[0] && p[-1] != '/') --p;
+ #else
+   while (p != argv[0] && ( ((p[-1] != '/') || (p[-1] != '\\')) &&
+ 			  (p[-2] != ':') ) ) --p;
+ #endif
    progname = p;
  
  #ifdef RLIMIT_STACK
***************
*** 2506,2512 ****
--- 2587,2595 ----
  
    signal (SIGFPE, float_signal);
  
+ #ifndef atarist
    signal (SIGPIPE, pipe_closed);
+ #endif
  
    decl_printable_name = decl_name;
    lang_expand_expr = (struct rtx_def *(*)()) do_abort;
***************
*** 2589,2595 ****
--- 2672,2688 ----
  	  else if (!strcmp (str, "dumpbase"))
  	    {
  	      dump_base_name = argv[++i];
+ #ifdef atarist
+ /* dump_base_name will typically be 'foo.c' here.  Need to truncate at the '.',
+    cause dots mean something here */
+ 	    {
+ 	      char * n = dump_base_name;
+ 	      for ( ; ((*n) && (*n != '.')) ; )
+ 		n++;
+ 	      *n = '\0';
  	    }
+ #endif
+ 	    }
  	  else if (str[0] == 'd')
  	    {
  	      register char *p = &str[1];
***************
*** 2932,2938 ****
--- 3025,3037 ----
       option flags in use.  */
    if (version_flag)
      {
+ #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
+ #include "PatchLev.h"
+ 	    fprintf (stderr, "%s version %s-atariST Patchlevel %s",
+ 		 language_string, version_string, PatchLevel);
+ #else
        fprintf (stderr, "%s version %s", language_string, version_string);
+ #endif
  #ifdef TARGET_VERSION
        TARGET_VERSION;
  #endif
***************
*** 2953,2958 ****
--- 3052,3059 ----
  
    compile_file (filename);
  
+ #if (!(defined(atarist) || defined(atariminix)))
+ #if (!(defined(CROSSHPUX)))
  #ifndef VMS
    if (flag_print_mem)
      {
***************
*** 2969,2974 ****
--- 3070,3077 ----
  #endif /* not USG */
      }
  #endif /* not VMS */
+ #endif
+ #endif
  
    if (errorcount)
      exit (FATAL_EXIT_CODE);
***************
*** 3080,3082 ****
--- 3183,3216 ----
  
    fprintf (stderr, "\n");
  }
+ 
+ #ifdef atarist
+ void atari_output_filename(file, filename)
+ FILE *file;
+ char *filename;
+ {
+     if( (!file) || (!filename) ) return;
+     for(; *filename; filename++)
+     {
+ 	if(*filename == '\\') putc('\\', file);
+ 	putc(*filename, file);
+     }
+ }
+ 
+ #include <string.h>
+ 
+ char *atari_filename_nondirectory(p)
+ char *p;
+ {
+     char *s;
+     
+     for(s = p + strlen(p); s != p; --s)
+     {
+ 	if((*s == '/') || (*s == '\\'))
+ 	    break;
+     }
+     
+     return (s == p) ? p : s+1;
+ }
+ 
+ #endif
*** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/cp-parse.y	Sat Feb 22 03:35:51 1992
--- cp-parse.y	Fri Mar  6 15:18:09 1992
***************
*** 1075,1081 ****
  		    }
  		  $$ = build_delete (type, expr, integer_three_node,
  				     LOOKUP_NORMAL|LOOKUP_HAS_IN_CHARGE,
! 				     TYPE_HAS_DESTRUCTOR (TREE_TYPE (type)) ? $$ : 0, 1);
  		}
  	| delete '[' ']' cast_expr  %prec UNARY
  		{
--- 1075,1082 ----
  		    }
  		  $$ = build_delete (type, expr, integer_three_node,
  				     LOOKUP_NORMAL|LOOKUP_HAS_IN_CHARGE,
! 				     TYPE_HAS_DESTRUCTOR (TREE_TYPE (type)) ? $$ : 0,
! 				     0); /*miron@cs.sfu.ca*/
  		}
  	| delete '[' ']' cast_expr  %prec UNARY
  		{
*** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/fixinc.svr4	Tue Feb 11 22:11:45 1992
--- fixinc.svr4	Fri Mar  6 15:17:54 1992
***************
*** 155,176 ****
    	  s/#machine(\([^)]*\))/defined(__\1__)/g
    	  s/#system(\([^)]*\))/defined(__\1__)/g
    	  s/#cpu(\([^)]*\))/defined(__\1__)/g
! 	  /#[a-z]*if.*[ (]m68k/		s/m68k/__m68k__/g
! 	  /#[a-z]*if.*[ (]__i386/	s/__i386/__i386__/g
! 	  /#[a-z]*if.*[ (]i386/		s/i386/__i386__/g
! 	  /#[a-z]*if.*[ (]sparc/	s/sparc/__sparc__/g
! 	  /#[a-z]*if.*[ (]mc68000/	s/mc68000/__mc68000__/g
! 	  /#[a-z]*if.*[ (]vax/		s/vax/__vax__/g
! 	  /#[a-z]*if.*[ (]sun3x/	s/sun3x/__sun3x__/g
! 	  /#[a-z]*if.*[ (]sun3/		s/sun3/__sun3__/g
! 	  /#[a-z]*if.*[ (]sun2/		s/sun2/__sun2__/g
! 	  /#[a-z]*if.*[ (]sun4c/	s/sun4c/__sun4c__/g
! 	  /#[a-z]*if.*[ (]sun4/		s/sun4/__sun4__/g
! 	  /#[a-z]*if.*[ (]sun/		s/sun/__sun__/g
! 	  /#[a-z]*if.*[ (]ns32000/	s/ns32000/__ns32000__/g
! 	  /#[a-z]*if.*[ (]pyr/		s/pyr/__pyr__/g
! 	  /#[a-z]*if.*[ (]is68k/	s/is68k/__is68k__/g
! 	  /#[a-z]*if.*[ (]sun386/	s/sun386/__sun386__/g
  	  s/u_char\([ 	][ 	]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ 	]*:[ 	]*[0-9][0-9]*\)/u_int\1/
  	  s/u_short\([ 	][ 	]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ 	]*:[ 	]*[0-9][0-9]*\)/u_int\1/
  	  s/ushort\([ 	][ 	]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ 	]*:[ 	]*[0-9][0-9]*\)/u_int\1/
--- 155,171 ----
    	  s/#machine(\([^)]*\))/defined(__\1__)/g
    	  s/#system(\([^)]*\))/defined(__\1__)/g
    	  s/#cpu(\([^)]*\))/defined(__\1__)/g
! 	  /#[a-z]*if.*[	 (]m68k/		s/m68k/__m68k__/g
! 	  /#[a-z]*if.*[	 (]__i386/	s/__i386/__i386__/g
! 	  /#[a-z]*if.*[	 (]i386/		s/i386/__i386__/g
! 	  /#[a-z]*if.*[	 (]sparc/	s/sparc/__sparc__/g
! 	  /#[a-z]*if.*[	 (]mc68000/	s/mc68000/__mc68000__/g
! 	  /#[a-z]*if.*[	 (]vax/		s/vax/__vax__/g
! 	  /#[a-z]*if.*[	 (]ns32000/	s/ns32000/__ns32000__/g
! 	  /#[a-z]*if.*[	 (]pyr/		s/pyr/__pyr__/g
! 	  /#[a-z]*if.*[	 (]is68k/	s/is68k/__is68k__/g
! 	  /#[a-z]*if.*[	 (]sun/		s/sun[234]?[cx8]?[6]?/__&__/g
! 	  /#[a-z]*if.*[	 (]sun/		s/sun[234]\{0,1\}[cx8]\{0,1\}[6]\{0,1\}/__&__/g
  	  s/u_char\([ 	][ 	]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ 	]*:[ 	]*[0-9][0-9]*\)/u_int\1/
  	  s/u_short\([ 	][ 	]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ 	]*:[ 	]*[0-9][0-9]*\)/u_int\1/
  	  s/ushort\([ 	][ 	]*[a-zA-Z0-9_][a-zA-Z0-9_]*[ 	]*:[ 	]*[0-9][0-9]*\)/u_int\1/
*** /net/acae127/home/bammi/etc/src/gnu/gcc-2.0/fixincludes	Sun Feb 16 22:43:11 1992
--- fixincludes	Fri Mar  6 15:17:55 1992
***************
*** 132,153 ****
  	  /#define.CTRL/		s/'\''c'\''/c/g
  	  /#define._CTRL/		s/'\''c'\''/c/g
  	  /#define.BSD43_CTRL/		s/'\''c'\''/c/g
! 	  /#[a-z]*if.*[ (]m68k/		s/m68k/__m68k__/g
! 	  /#[a-z]*if.*[ (]__i386/	s/__i386/__i386__/g
! 	  /#[a-z]*if.*[ (]i386/		s/i386/__i386__/g
! 	  /#[a-z]*if.*[ (]sparc/	s/sparc/__sparc__/g
! 	  /#[a-z]*if.*[ (]mc68000/	s/mc68000/__mc68000__/g
! 	  /#[a-z]*if.*[ (]vax/		s/vax/__vax__/g
! 	  /#[a-z]*if.*[ (]sun3x/	s/sun3x/__sun3x__/g
! 	  /#[a-z]*if.*[ (]sun3/		s/sun3/__sun3__/g
! 	  /#[a-z]*if.*[ (]sun2/		s/sun2/__sun2__/g
! 	  /#[a-z]*if.*[ (]sun4c/	s/sun4c/__sun4c__/g
! 	  /#[a-z]*if.*[ (]sun4/		s/sun4/__sun4__/g
! 	  /#[a-z]*if.*[ (]sun/		s/sun/__sun__/g
! 	  /#[a-z]*if.*[ (]ns32000/	s/ns32000/__ns32000__/g
! 	  /#[a-z]*if.*[ (]pyr/		s/pyr/__pyr__/g
! 	  /#[a-z]*if.*[ (]is68k/	s/is68k/__is68k__/g
! 	  /#[a-z]*if.*[ (]sun386/	s/sun386/__sun386__/g
  	  /#define.NULL[ 	]/	i\
  		#undef NULL
  	' $2/$file > $2/$file.sed
--- 132,148 ----
  	  /#define.CTRL/		s/'\''c'\''/c/g
  	  /#define._CTRL/		s/'\''c'\''/c/g
  	  /#define.BSD43_CTRL/		s/'\''c'\''/c/g
! 	  /#[a-z]*if.*[	 (]m68k/		s/m68k/__m68k__/g
! 	  /#[a-z]*if.*[	 (]__i386/	s/__i386/__i386__/g
! 	  /#[a-z]*if.*[	 (]i386/		s/i386/__i386__/g
! 	  /#[a-z]*if.*[	 (]sparc/	s/sparc/__sparc__/g
! 	  /#[a-z]*if.*[	 (]mc68000/	s/mc68000/__mc68000__/g
! 	  /#[a-z]*if.*[	 (]vax/		s/vax/__vax__/g
! 	  /#[a-z]*if.*[	 (]ns32000/	s/ns32000/__ns32000__/g
! 	  /#[a-z]*if.*[	 (]pyr/		s/pyr/__pyr__/g
! 	  /#[a-z]*if.*[	 (]is68k/	s/is68k/__is68k__/g
! 	  /#[a-z]*if.*[	 (]sun/		s/sun[234]\{0,1\}[cx8]\{0,1\}[6]\{0,1\}/__&__/g
! 	  /#[a-z]*if.*[	 (]sun/		s/sun[234]?[cx8]?[6]?/__&__/g
  	  /#define.NULL[ 	]/	i\
  		#undef NULL
  	' $2/$file > $2/$file.sed
